package com.liqi.monitor.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.liqi.common.utils.DateUtils;
import com.liqi.monitor.domain.DvDeploymentDiskInfo;
import com.liqi.monitor.mapper.DvDeploymentDiskInfoMapper;
import com.liqi.monitor.service.IDvDeploymentDiskInfoService;

/**
 * 设备磁盘信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-11-10
 */
@Service
public class DvDeploymentDiskInfoServiceImpl implements IDvDeploymentDiskInfoService 
{
    @Autowired
    private DvDeploymentDiskInfoMapper dvDeploymentDiskInfoMapper;

    /**
     * 查询设备磁盘信息
     * 
     * @param id 设备磁盘信息主键
     * @return 设备磁盘信息
     */
    @Override
    public DvDeploymentDiskInfo selectDvDeploymentDiskInfoById(Long id)
    {
        return dvDeploymentDiskInfoMapper.selectDvDeploymentDiskInfoById(id);
    }

    /**
     * 查询设备磁盘信息列表
     * 
     * @param dvDeploymentDiskInfo 设备磁盘信息
     * @return 设备磁盘信息
     */
    @Override
    public List<DvDeploymentDiskInfo> selectDvDeploymentDiskInfoList(DvDeploymentDiskInfo dvDeploymentDiskInfo)
    {
        return dvDeploymentDiskInfoMapper.selectDvDeploymentDiskInfoList(dvDeploymentDiskInfo);
    }

    /**
     * 新增设备磁盘信息
     * 
     * @param dvDeploymentDiskInfo 设备磁盘信息
     * @return 结果
     */
    @Override
    public int insertDvDeploymentDiskInfo(DvDeploymentDiskInfo dvDeploymentDiskInfo)
    {
        return dvDeploymentDiskInfoMapper.insertDvDeploymentDiskInfo(dvDeploymentDiskInfo);
    }

    /**
     * 修改设备磁盘信息
     * 
     * @param dvDeploymentDiskInfo 设备磁盘信息
     * @return 结果
     */
    @Override
    public int updateDvDeploymentDiskInfo(DvDeploymentDiskInfo dvDeploymentDiskInfo)
    {
        dvDeploymentDiskInfo.setUpdateTime(DateUtils.getNowDate());
        return dvDeploymentDiskInfoMapper.updateDvDeploymentDiskInfo(dvDeploymentDiskInfo);
    }

    /**
     * 批量删除设备磁盘信息
     * 
     * @param ids 需要删除的设备磁盘信息主键
     * @return 结果
     */
    @Override
    public int deleteDvDeploymentDiskInfoByIds(Long[] ids)
    {
        return dvDeploymentDiskInfoMapper.deleteDvDeploymentDiskInfoByIds(ids);
    }

    /**
     * 删除设备磁盘信息信息
     * 
     * @param id 设备磁盘信息主键
     * @return 结果
     */
    @Override
    public int deleteDvDeploymentDiskInfoById(Long id)
    {
        return dvDeploymentDiskInfoMapper.deleteDvDeploymentDiskInfoById(id);
    }
}
